package com.hnevc.yinqi;

import java.util.Scanner;

public class Work16 {
    public static void main(String[] args) {
        Scanner sr=new Scanner(System.in);
        System.out.println("输入一个三位数");
        String s=sr.next();
        int i;

        for (i=0;i<s.length();i++){
            char b=s.charAt(i);
            int j=s.length()-1;
            char c=s.charAt(j-i);
            if (b==c){
                System.out.printf("    b="+b);
                System.out.printf("    c="+c);
            } else {
                System.out.println("不是回文数");
                break;
            }

        }
        System.out.println(i);
        if(i==s.length()-1)
            System.out.println("是回文数");
    }
}
